package com.zzh.socketlibrary.manager;

/**
 * @author ：zzh
 * time ： 2021/5/24 15:51
 * 定义soket通信过程中，数据规则
 */
public class SocketDataConst {
    // 字节数据最后字节的值为4时，认为是消息数据。因为消息数据比较少，所以用最后一个字节区分
    public static final byte MSG_TYPE_LAST_BYTE = 4;
    //消息状态值
    public static final String MSG_SUCCESS = "true";
    public static final String MSG_FAILED = "false";
    // 消息key和value连接符，消息字符串类似：msg_connect_state:true，表示连接成功
    public static final String MSG_KEY_VALUE_SPLIT_STRING = ":";
    // socket连接时的状态，true连接成功，false连接失败
    public static final String MSG_SOCKET_CONNECT_STATE = "msg_socket_connect_state";
    // socket断开连接时的状态，true 断开成功
    public static final String MSG_SOCKET_DISCONNECT_STATE = "msg_socket_disconnect_state";
    // pc发送断开连接消息给设备，true：去连接，false，断开连接
    public static final String MSG_SOCKET_CONNECT = "msg_socket_connect";
}
